Queues are data structures used to store data in a particular order. One type of queue is a maximum priority queue, in which when a value is retrieved from the queue, the maximum value stored in the queue is provided. Another type of queue is a minimum priority queue, in which when a value is retrieved from the queue, the minimum value stored in the queue is provided. In both of these types of priority queues, for the purposes herein, it is said that the value having the greatest priority is provided when retrieved from the queue. In the case of a maximum priority queue, the value having the greatest priority is the highest value, and one value has a greater priority than another value if it is larger. In the case of a minimum priority queue, the value having the greatest priority is the lowest value, and one value has a greater priority than another value if it is smaller.